<template>
  <div class='news-unit hover'>
    <img :src="formaltInfo.img||defaultImg" alt="">
    <div>
      <p class="title white-space ft16">{{formaltInfo.title||"暂无标题"}}</p>
      <p class="content color-999 ft12">{{formaltInfo.content||"暂无内容暂无内容暂无内容暂无内容暂无内容暂无内容暂无内容暂无内容暂无内容暂无内容暂无"}}</p>
      <p><span class="time ft12">{{formaltInfo.time||"暂无时间"}}</span> <span class="fr ft12">查看详情</span></p>
    </div>
  </div>
</template>
<script>
export default {
  props:["info"],
  components: {},
  name: "",
  data() {
    return {
      defaultImg:require("../../assets/imgs/homepage/news/default.png")
    };
  },
  computed:{
    formaltInfo(){
      return this.info
    }
  },
  methods: {},
  created() {}
};
</script>
<style lang="scss" scoped>
.news-unit {
  box-sizing: border-box;
  padding:10px;
  display: flex;

  img{
    width: 90px;
  }
  >div{
    flex: 1;
    padding-left: 10px;
    display: inherit;
    flex-direction: column;
    justify-content: center;

    .content{
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
    }
  }
}
</style>